PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUGetFontFeatureTypes

Obtains a list of the available feature types in a font.

OSStatus ATSUGetFontFeatureTypes (
                     ATSUFontID iFont,
                     ItemCount iMaximumTypes,
                     ATSUFontFeatureType oTypes[],
                     ItemCount *oActualTypeCount);
iFont
A value of type ATSUFontID. Pass the ID of the font whose feature information you want to obtain.

iMaximumTypes
The maximum number of feature types in the font. Typically, this is equivalent to the number of elements in the oTypes array. To determine this value, see the discussion below.

oTypes
An array of values of type ATSUFontFeatureType. Before calling ATSUGetFontFeatureTypes, pass a pointer to memory that you have allocated for this array. On return, the array contains a list of the feature types defined in the font. If you are of how much memory to allocate, see the discussion below. You cannot pass NULL for this parameter.

oActualTypeCount
A pointer to a count. On return, the actual number of feature types defined in the font. This may be greater than the value passed in the iMaximumTypes parameter. You cannot pass NULL for this parameter.

function result
A result code. The result code kATSUInvalidFontErr indicates that the ID does not correspond to any installed font. For a list of other ATSUI-specific result codes, see Result Codes.
DISCUSSION
The ATSUGetFontFeatureTypes function obtains a list of the feature types that are available in a font.

The best way to use ATSUGetFontFeatureTypes is to call it twice:

  1. Pass the ID of the font whose feature types you want to obtain in the iFont parameter, NULL for the oTypes parameter, and 0 for the other parameters. ATSUGetFontFeatureTypes returns the size of the feature type array in the oActualTypeCount parameter.

  2. Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oTypes parameter; on return, the pointer references the array of feature types.
VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)